const mongoose = require('mongoose');
const { baseModel } = require('./baseModel')
const homeWorkSchema = new mongoose.Schema({
    //作业名称
    name:{
        type:String,
        required:true
    },
    //父文件id
    parentId:{
        type:String,
        required:true
    },
    //班级
    classId:{
        type:mongoose.Schema.Types.ObjectId,
        required:true,
        ref:'Class'
    },
    //应交人数
    shouldNumber:{
        type:Number,
        required:true
    },
    //已交人数
    hadNumber:{
        type:Number,
        default:0
    },
    //创建人
    createUser:{
        type:String,
        required:true
    },
    ...baseModel
})

module.exports = homeWorkSchema